/**
 * Created by Time on 2015/3/3.
 */
//Readchar mecare
Readchar.Plugins = {pageHTML5Scroll: function (option) {
    var defaultOption = {pageIdList: [], pageClass: ".", pageContainerClass: ".", allPageConClass: ".", duration: option.duration ? option.duration : 1000, headerClass: option.headerClass ? option.headerClass : ".", footerClass: option.footerClass ? option.footerClass : "."}
    var aPageList = option.pageIdList ? option.pageIdList : defaultOption.pageIdList, sPageClass = option.pageClass ? option.pageClass : defaultOption.pageClass, sPageContainerClass = option.pageContainerClass ? option.pageContainerClass : defaultOption.pageContainerClass, sAllPageConClass = option.allPageConClass ? option.allPageConClass : defaultOption.allPageConClass, currentIn = 0, currentOut = 0, currentPageNine = 0, currentURL = window.location.href, index = currentURL.indexOf("#") != -1 ? currentURL.indexOf("#") : currentURL.length, timeout = null, mElm_Title = $(".cuptime-title"), mElm_Left = $(".cuptime-left"), mElm_Right = $(".cuptime-right"), mElm_CTit = $(".cup-04-tit"), mElm_C_03 = $(".cuptime-03-01"), mElm_Mp = $(".cuptime-mp3");
    mElm_Mp_Z = $(".mp-zn"), mElm_Img = $(".cup-img"), mElm_Fiv = $(".cup-05-08"), mElm_Two = $(".cup-02"), mElm_Fiv_Ten = $(".cup-05-10"), mElm_Two_Fiv = $(".cuptime-02-04"), mElm_Fiv_Sev = $(".cup-05-07"), mElm_Sev_Tit = $(".cup-07-title"), mElm_Sev_Six = $(".cup-07-06");
    function initPage() {
        initMecarePage();
        pageScroll();
        Readchar.Event.buildWheel(pageScroll);
        Readchar.Event.addEvent(document, "touchend", pageScroll);
        $(".r-navi-icon").bind({click: function () {
            var naviIndex = $(".r-navi-icon").index($(this));
            naviIndex++;
            currentURL = window.location.href = currentURL.substring(0, index) + aPageList[naviIndex];
            pageScroll();
        }});
        $(".pn-list > a").click(function () {
            var naIndex = $(".pn-list > a").index($(this));
            if ((naIndex + 1) % 8 == 1) {
                currentURL = window.location.href = currentURL.substring(0, index) + aPageList[1];
                pageScroll();
                return false;
            }
            if ((naIndex + 1) % 8 == 2) {
                currentURL = window.location.href = currentURL.substring(0, index) + aPageList[2];
                pageScroll();
                return false;
            }
            if ((naIndex + 1) % 8 == 3) {
                currentURL = window.location.href = currentURL.substring(0, index) + aPageList[3];
                pageScroll();
                return false;
            }
            if ((naIndex + 1) % 8 == 4) {
                currentURL = window.location.href = currentURL.substring(0, index) + aPageList[7];
                pageScroll();
                return false;
            }
            if ((naIndex + 1) % 8 == 6) {
            }
        });
    }

    function getTouchPos(e) {
        event = Readchar.Event.getEvent(e);
        touchPosition = Readchar.Event.getTouchStart(event);
    }

    function getTouchMovPos(e) {
        event = Readchar.Event.getEvent(e);
        touchMovPos = Readchar.Event.getTouchMove(event);
    }

    function initMecarePage() {
        $(sPageClass).height(Readchar.Style.getFullPageSize().height);
        mElm_Title.removeClass("tit-stop");
        mElm_Left.removeClass("left-stop");
        mElm_Right.removeClass("right-stop");
    }

    function cupLastLay() {
        if (currentPageNine == 0) {
            chageNavBg(1);
        }
        $(".cup-09>ul>li").removeClass("cup-09-01");
        $(".cup-09>ul>li").eq(currentPageNine).addClass("cup-09-01");
        $(".m-page").stop().animate({"opacity": 0}, 800);
        $(".m-page").eq(currentPageNine).stop().animate({"opacity": 1}, 800);
    }

    function pageOneDown() {
        $(".navi-fixed").delay(500).animate({"top": "0", "opacity": 1}, 500);
        chageNavBg(1);
        window.location.href = currentURL.substring(0, index) + aPageList[1];
        $(sAllPageConClass).css({"transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)", "-webkit-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)", "-moz-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)", "-o-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)"});
    }

    function pageThreeDown() {
        $(".pn-list > a").removeClass("fl-top-index");
        $(".pn-list > a").eq(2).addClass("fl-top-index");
        setOne = setTimeout(function () {
            mElm_C_03.removeClass("cup-03-action");
            clearTimeout(setOne);
        }, 900)
        setOut = setTimeout(function () {
            mElm_C_03.addClass("cup-03-stop");
            clearTimeout(setOut);
        }, 1800);
        $(".cup-03-title").removeClass("opacit-stop");
        window.location.href = currentURL.substring(0, index) + aPageList[3];
        $(sPageContainerClass).css({"transform": "translate3d(0,-200%,0)", "-webkit-transform": "translate3d(0,-200%,0)", "-moz-transform": "translate3d(0,-200%,0)", "-o-transform": "translate3d(0,-200%,0)"});
    }

    function pageFourDown() {
        mElm_CTit.removeClass("opacit-stop");
        if (setOne != null) {
            clearTimeout(setOne);
        }
        if (setOut != null) {
            clearTimeout(setOut);
        }
        if (!mElm_C_03.hasClass("cup-03-action")) {
            mElm_C_03.addClass("cup-03-action");
        }
        if (mElm_C_03.hasClass("cup-03-stop")) {
            mElm_C_03.removeClass("cup-03-stop");
        }
        window.location.href = currentURL.substring(0, index) + aPageList[4];
        $(sPageContainerClass).css({"transform": "translate3d(0,-300%,0)", "-webkit-transform": "translate3d(0,-300%,0)", "-moz-transform": "translate3d(0,-300%,0)", "-o-transform": "translate3d(0,-300%,0)"});
    }

    function pageFiveDown() {
        chageNavBg(0);
        mElm_CTit.addClass("opacit-stop");
        $(".cup-05-04").removeClass("opacit-stop");
        window.location.href = currentURL.substring(0, index) + aPageList[5];
        $(sPageContainerClass).css({"transform": "translate3d(0,-400%,0)", "-webkit-transform": "translate3d(0,-400%,0)", "-moz-transform": "translate3d(0,-400%,0)", "-o-transform": "translate3d(0,-400%,0)"});
    }

    var cupIndexCurr = 0;

    function pageSixDown(direct) {
        if (direct != null) {
            chageNavBg(1);
            window.location.href = currentURL.substring(0, index) + aPageList[6];
            $(sPageContainerClass).css({"transform": "translate3d(0,-500%,0)", "-webkit-transform": "translate3d(0,-500%,0)", "-moz-transform": "translate3d(0,-500%,0)", "-o-transform": "translate3d(0,-500%,0)"});
            $(".cup-06").removeClass("opacit-stop");
        } else {
            currentIn--;
            var num = Math.ceil(Math.random() * 10);
            cupOc = parseInt(mElm_Fiv_Sev.text());
            cupOc -= num;
            if (cupOc < 0) {
                cupOc = 0;
            }
            mElm_Fiv_Sev.text(cupOc + "℃");
            if (cupOc < 75) {
                if (cupIndexCurr == 0) {
                    mElm_Fiv_Sev.css("background", "#ffae00");
                    mElm_Fiv.eq(0).animate({"top": "-120px", "opacity": "0"}, 100);
                    mElm_Fiv.eq(1).animate({"top": 0, "opacity": 1}, 100);
                    mElm_Fiv_Ten.eq(0).animate({"opacity": "0"}, 100, function () {
                        mElm_Fiv_Ten.eq(0).css({"display": "none"});
                    });
                    mElm_Fiv_Ten.eq(1).animate({"opacity": "1"}, 100, function () {
                        mElm_Fiv_Ten.eq(1).css({"display": "block"});
                    });
                    cupIndexCurr++;
                }
            }
            if (cupOc < 35) {
                if (cupIndexCurr == 1) {
                    mElm_Fiv_Sev.css("background", "#00bfff");
                    mElm_Fiv.eq(1).animate({"top": "-120px", "opacity": "0"}, 100);
                    mElm_Fiv.eq(2).animate({"top": 0, "opacity": 1}, 100);
                    mElm_Fiv_Ten.eq(1).animate({"opacity": "0"}, 100, function () {
                        mElm_Fiv_Ten.eq(1).css({"display": "none"});
                    });
                    mElm_Fiv_Ten.eq(2).animate({"opacity": "1"}, 100, function () {
                        mElm_Fiv_Ten.eq(2).css({"display": "block"});
                    });
                    cupIndexCurr++;
                }
            }
            if (cupOc != 0) {
                Readchar.Event.buildWheel(pageScroll);
            }
            if (cupOc == 0) {
                currentIn++;
                chageNavBg(1);
                window.location.href = currentURL.substring(0, index) + aPageList[6];
                $(sPageContainerClass).css({"transform": "translate3d(0,-500%,0)", "-webkit-transform": "translate3d(0,-500%,0)", "-moz-transform": "translate3d(0,-500%,0)", "-o-transform": "translate3d(0,-500%,0)"});
                $(".cup-06").removeClass("opacit-stop");
            }
        }
    }

    function pageSevenDown() {
        $(".pn-list > a").removeClass("fl-top-index");
        $(".pn-list > a").eq(3).addClass("fl-top-index");
        window.location.href = currentURL.substring(0, index) + aPageList[7];
        $(sPageContainerClass).css({"transform": "translate3d(0,-600%,0)", "-webkit-transform": "translate3d(0,-600%,0)", "-moz-transform": "translate3d(0,-600%,0)", "-o-transform": "translate3d(0,-600%,0)"});
    }

    var cupOc = 95, subCupS = 0;

    function pageEightDown(direct) {
        if (direct == null) {
            currentIn--;
            if (subCupS == 0) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                $(".cup-07-tit").css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
            }
            if (subCupS == 1) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 350 + "px,0)", "-webkit-transform": "translate3d(0,-" + 350 + "px,0)", "-moz-transform": "translate3d(0,-" + 350 + "px,0)", "-o-transform": "translate3d(0,-" + 350 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 200 + "px,0)", "-webkit-transform": "translate3d(0,-" + 200 + "px,0)", "-moz-transform": "translate3d(0,-" + 200 + "px,0)", "-o-transform": "translate3d(0,-" + 200 + "px,0)"});
            }
            if (subCupS == 2) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 680 + "px,0)", "-webkit-transform": "translate3d(0,-" + 680 + "px,0)", "-moz-transform": "translate3d(0,-" + 680 + "px,0)", "-o-transform": "translate3d(0,-" + 680 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
            }
            if (subCupS == 3) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 830 + "px,0)", "-webkit-transform": "translate3d(0,-" + 830 + "px,0)", "-moz-transform": "translate3d(0,-" + 830 + "px,0)", "-o-transform": "translate3d(0,-" + 830 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 750 + "px,0)", "-webkit-transform": "translate3d(0,-" + 750 + "px,0)", "-moz-transform": "translate3d(0,-" + 750 + "px,0)", "-o-transform": "translate3d(0,-" + 750 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
            }
            if (subCupS == 4) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 980 + "px,0)", "-webkit-transform": "translate3d(0,-" + 980 + "px,0)", "-moz-transform": "translate3d(0,-" + 980 + "px,0)", "-o-transform": "translate3d(0,-" + 980 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 900 + "px,0)", "-webkit-transform": "translate3d(0,-" + 900 + "px,0)", "-moz-transform": "translate3d(0,-" + 900 + "px,0)", "-o-transform": "translate3d(0,-" + 900 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 450 + "px,0)", "-webkit-transform": "translate3d(0,-" + 450 + "px,0)", "-moz-transform": "translate3d(0,-" + 450 + "px,0)", "-o-transform": "translate3d(0,-" + 450 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
            }
            if (subCupS == 5) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 1130 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1130 + "px,0)", "-moz-transform": "translate3d(0,-" + 1130 + "px,0)", "-o-transform": "translate3d(0,-" + 1130 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 1050 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1050 + "px,0)", "-moz-transform": "translate3d(0,-" + 1050 + "px,0)", "-o-transform": "translate3d(0,-" + 1050 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 450 + "px,0)", "-webkit-transform": "translate3d(0,-" + 450 + "px,0)", "-moz-transform": "translate3d(0,-" + 450 + "px,0)", "-o-transform": "translate3d(0,-" + 450 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(5).css({"transform": "translate3d(0,-" + 150 + "px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-" + 150 + "px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-" + 150 + "px,0) scale(0.49,0.49)"});
            }
            if (subCupS == 6) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 1280 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1280 + "px,0)", "-moz-transform": "translate3d(0,-" + 1280 + "px,0)", "-o-transform": "translate3d(0,-" + 1280 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 1200 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1200 + "px,0)", "-moz-transform": "translate3d(0,-" + 1200 + "px,0)", "-o-transform": "translate3d(0,-" + 1200 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 750 + "px,0)", "-webkit-transform": "translate3d(0,-" + 750 + "px,0)", "-moz-transform": "translate3d(0,-" + 750 + "px,0)", "-o-transform": "translate3d(0,-" + 750 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 450 + "px,0)", "-webkit-transform": "translate3d(0,-" + 450 + "px,0)", "-moz-transform": "translate3d(0,-" + 450 + "px,0)", "-o-transform": "translate3d(0,-" + 450 + "px,0)"});
                mElm_Img.eq(5).css({"transform": "translate3d(0,-" + 300 + "px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-" + 300 + "px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-" + 300 + "px,0) scale(0.49,0.49)"});
                mElm_Img.eq(6).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
            }
            var cupHx = mElm_Sev_Six;
            if (subCupS == 7) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 1430 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1430 + "px,0)", "-moz-transform": "translate3d(0,-" + 1430 + "px,0)", "-o-transform": "translate3d(0,-" + 1430 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 1350 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1350 + "px,0)", "-moz-transform": "translate3d(0,-" + 1350 + "px,0)", "-o-transform": "translate3d(0,-" + 1350 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 1130 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1130 + "px,0)", "-moz-transform": "translate3d(0,-" + 1130 + "px,0)", "-o-transform": "translate3d(0,-" + 1130 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 750 + "px,0)", "-webkit-transform": "translate3d(0,-" + 750 + "px,0)", "-moz-transform": "translate3d(0,-" + 750 + "px,0)", "-o-transform": "translate3d(0,-" + 750 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(5).css({"transform": "translate3d(0,-" + 457 + "px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-" + 457 + "px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-" + 457 + "px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-" + 457 + "px,0) scale(0.49,0.49)"});
                mElm_Img.eq(6).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(7).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                mElm_Sev_Tit.eq(subCupS + 1).removeClass("opacit-stop");
            }
            if (subCupS == 8) {
                currentIn++;
                cupHx.remove();
                cupHx.css({"transform": "translate3d(0,0px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,0px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,0px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,0px,0) scale(0.49,0.49)"});
                $("body").append(cupHx);
                cupHx.addClass("cup-hx");
                setTimeout(function () {
                    cupHx.css({"transform": "translate3d(0,100px,0) scale(1.0,1.0)", "-webkit-transform": "translate3d(0,100px,0) scale(1.0,1.0)", "-moz-transform": "translate3d(0,100px,0) scale(1.0,1.0)", "-o-transform": "translate3d(0,100px,0) scale(1.0,1.0)"});
                }, 50);
                var mpTime = null, actionIcon = 0;
                mpTime = setInterval(function () {
                    $(".cup-x").removeClass("mpt-show");
                    actionIcon++;
                    $(".cup-x").eq(actionIcon).addClass("mpt-show");
                    if (actionIcon == $(".cup-x").length - 1) {
                        clearInterval(mpTime);
                    }
                }, 28);
                $(".cup-08").removeClass("opacit-stop");
                window.location.href = currentURL.substring(0, index) + aPageList[8];
                $(sPageContainerClass).css({"transform": "translate3d(0,-700%,0)", "-webkit-transform": "translate3d(0,-700%,0)", "-moz-transform": "translate3d(0,-700%,0)", "-o-transform": "translate3d(0,-700%,0)"});
            }
            if (subCupS != 8) {
                mElm_Sev_Tit.eq(subCupS - 1).addClass("opacit-stop");
                mElm_Sev_Tit.eq(subCupS).removeClass("opacit-stop");
            }
            if (subCupS < 9) {
                subCupS++;
            } else {
                subCupS = 9;
            }
            if (subCupS != 9) {
                Readchar.Event.buildWheel(pageScroll);
            }
        } else {
            window.location.href = currentURL.substring(0, index) + aPageList[8];
            $(sPageContainerClass).css({"transform": "translate3d(0,-700%,0)", "-webkit-transform": "translate3d(0,-700%,0)", "-moz-transform": "translate3d(0,-700%,0)", "-o-transform": "translate3d(0,-700%,0)"});
        }
    }

    function pageTwoDown() {
        mElm_Left.addClass("opacit-stop");
        mElm_Right.addClass("opacit-stop");
        $(".pn-list > a").removeClass("fl-top-index");
        $(".pn-list > a").eq(1).addClass("fl-top-index");
        var emls = mElm_Mp;
        if (currentIn == 2) {
            mElm_Mp.remove();
            mElm_Mp.css({"position": "fixed"});
            $("body").append(emls);
            var mpTime = null, actionIcon = 0;
            mpTime = setInterval(function () {
                mElm_Mp_Z.removeClass("mp-show");
                actionIcon++;
                mElm_Mp_Z.eq(actionIcon).addClass("mp-show");
                if (actionIcon == mElm_Mp_Z.length - 2) {
                    clearInterval(mpTime);
                }
            }, 16);
        }
        emls.delay(600).animate({"opacity": 0}, 200, function () {
            mElm_Two.removeClass("cup-stop");
            mElm_Two_Fiv.removeClass("opacit-stop");
            $(".cup-02-icon").removeClass("opacit-stop");
            emls.css({"z-index": "-1"});
        });
        mElm_Two.css({"top": (Readchar.Style.getFullPageSize().height * 0.3) + 93});
        window.location.href = currentURL.substring(0, index) + aPageList[2];
        $(sPageContainerClass).css({"transform": "translate3d(0,-100%,0)", "-webkit-transform": "translate3d(0,-100%,0)", "-moz-transform": "translate3d(0,-100%,0)", "-o-transform": "translate3d(0,-100%,0)"});
    }

    function pageNineDown(direct) {
        var cupHx = mElm_Sev_Six;
        if (direct != null) {
            if (subCupS == 8) {
                cupHx.css({"transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-457px,0) scale(0.49,0.49)"});
            }
            if (subCupS == 7) {
                cupHx.css({"transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-300px,0) scale(0.49,0.49)"});
            }
            if (subCupS == 6) {
                cupHx.css({"transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-150px,0) scale(0.49,0.49)"});
            }
        } else {
            cupHx.css({"transform": "translate3d(0,-150%,0) scale(1.0,1.0)", "-webkit-transform": "translate3d(0,-150%,0) scale(1.0,1.0)", "-moz-transform": "translate3d(0,-150%,0) scale(1.0,1.0)", "-o-transform": "translate3d(0,-150%,0) scale(1.0,1.0)"});
        }
        window.location.href = currentURL.substring(0, index) + aPageList[9];
        $(sPageContainerClass).css({"transform": "translate3d(0,-800%,0)", "-webkit-transform": "translate3d(0,-800%,0)", "-moz-transform": "translate3d(0,-800%,0)", "-o-transform": "translate3d(0,-800%,0)"});
    }

    function pageTenDown(direct) {
        if (currentPageNine != 2 && direct == null) {
            currentIn--;
            currentPageNine++;
            cupLastLay();
        } else if (direct != null) {
            currentIn--;
            window.location.href = currentURL.substring(0, index) + aPageList[9];
        } else {
            window.location.href = currentURL.substring(0, index) + aPageList[10];
            $(sAllPageConClass).css({"transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)", "-webkit-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)", "-moz-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)", "-o-transform": "translate3d(0,-" + ($(defaultOption.headerClass).height() + $(defaultOption.footerClass).height()) + "px,0)"});
        }
    }

    function pageOneUp() {
        mElm_Mp.remove();
        mElm_Mp.css({"position": "absolute"});
        $(".f-page").append(mElm_Mp);
        $(".navi-fixed").animate({"top": "-70px"}, 500);
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sPageContainerClass).css({"transform": "translate3d(0,0%,0)", "-webkit-transform": "translate3d(0,0,0)", "-moz-transform": "translate3d(0,0,0)", "-o-transform": "translate3d(0,0,0)"});
        $(sAllPageConClass).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
    }

    function pageTwoUp() {
        mElm_Left.removeClass("opacit-stop");
        mElm_Right.removeClass("opacit-stop");
        $(".pn-list > a").removeClass("fl-top-index");
        $(".pn-list > a").eq(0).addClass("fl-top-index");
        mElm_Mp.stop().animate({"opacity": "1"}, 300);
        if (currentOut == 1) {
            return;
        } else {
            var mpTime = null, actionIcon = mElm_Mp_Z.length - 1;
            mpTime = setInterval(function () {
                mElm_Mp_Z.removeClass("mp-show");
                actionIcon--;
                mElm_Mp_Z.eq(actionIcon).addClass("mp-show");
                if (actionIcon == 0) {
                    clearInterval(mpTime);
                }
            }, 16);
        }
        mElm_Mp.css({"z-index": "1000"});
        mElm_Two.addClass("cup-stop");
        mElm_Two_Fiv.addClass("opacit-stop");
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
    }

    function pageThreeUp() {
        $(".pn-list > a").removeClass("fl-top-index");
        $(".pn-list > a").eq(1).addClass("fl-top-index");
        if (setOne != null) {
            clearTimeout(setOne);
        }
        if (setOut != null) {
            clearTimeout(setOut);
        }
        if (!mElm_C_03.hasClass("cup-03-action")) {
            mElm_C_03.addClass("cup-03-action");
        }
        if (mElm_C_03.hasClass("cup-03-stop")) {
            mElm_C_03.removeClass("cup-03-stop");
        }
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
    }

    var setOne = null;
    var setOut = null;

    function pageFourUp() {
        mElm_CTit.addClass("opacit-stop");
        setOne = setTimeout(function () {
            mElm_C_03.removeClass("cup-03-action");
            clearTimeout(setOne);
        }, 900)
        setOut = setTimeout(function () {
            mElm_C_03.addClass("cup-03-stop");
            clearTimeout(setOut);
        }, 1800);
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
    }

    function pageFiveUp(direct) {
        chageNavBg(1)
        if (direct == null) {
            mElm_CTit.removeClass("opacit-stop");
            cupOc = parseInt(mElm_Fiv_Sev.text());
            currentIn++;
            var num = Math.ceil(Math.random() * 10);
            cupOc += num;
            if (cupOc > 95) {
                cupOc = 95;
            }
            mElm_Fiv_Sev.text(cupOc + "℃");
            if (cupOc > 45) {
                if (cupIndexCurr == 2) {
                    mElm_Fiv_Sev.css("background", "#00bfff");
                    mElm_Fiv.eq(1).animate({"top": "0px", "opacity": "1"}, 100);
                    mElm_Fiv.eq(2).animate({"top": "120px", "opacity": "0"}, 100);
                    mElm_Fiv_Ten.eq(1).animate({"opacity": "1"}, 100, function () {
                        mElm_Fiv_Ten.eq(1).css({"display": "block"});
                    });
                    mElm_Fiv_Ten.eq(2).animate({"opacity": "0"}, 100, function () {
                        mElm_Fiv_Ten.eq(2).css({"display": "none"});
                    });
                    cupIndexCurr--;
                }
            }
            if (cupOc > 75) {
                if (cupIndexCurr == 1) {
                    mElm_Fiv_Sev.css("background", "#ff0000");
                    mElm_Fiv.eq(0).animate({"top": "0px", "opacity": "1"}, 100);
                    mElm_Fiv.eq(1).animate({"top": "120px", "opacity": "0"}, 100);
                    mElm_Fiv_Ten.eq(0).animate({"opacity": "1"}, 100, function () {
                        mElm_Fiv_Ten.eq(0).css({"display": "block"});
                    });
                    mElm_Fiv_Ten.eq(1).animate({"opacity": "0"}, 100, function () {
                        mElm_Fiv_Ten.eq(1).css({"display": "none"});
                    });
                    cupIndexCurr--;
                }
            }
            if (cupOc != 95) {
                Readchar.Event.buildWheel(pageScroll);
            }
            if (cupOc == 95) {
                currentIn--;
                window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
                $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
            }
        }
    }

    function pageSixUp() {
        chageNavBg(0);
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
    }

    function pageSevenUp(direct) {
        if (subCupS != 0 && direct == null) {
            if (subCupS == 1) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
                $(".cup-07-tit").css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
            }
            if (subCupS == 2) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
            }
            if (subCupS == 3) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 350 + "px,0)", "-webkit-transform": "translate3d(0,-" + 350 + "px,0)", "-moz-transform": "translate3d(0,-" + 350 + "px,0)", "-o-transform": "translate3d(0,-" + 350 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 200 + "px,0)", "-webkit-transform": "translate3d(0,-" + 200 + "px,0)", "-moz-transform": "translate3d(0,-" + 200 + "px,0)", "-o-transform": "translate3d(0,-" + 200 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
            }
            if (subCupS == 4) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 680 + "px,0)", "-webkit-transform": "translate3d(0,-" + 680 + "px,0)", "-moz-transform": "translate3d(0,-" + 680 + "px,0)", "-o-transform": "translate3d(0,-" + 680 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
            }
            if (subCupS == 5) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 850 + "px,0)", "-webkit-transform": "translate3d(0,-" + 850 + "px,0)", "-moz-transform": "translate3d(0,-" + 850 + "px,0)", "-o-transform": "translate3d(0,-" + 850 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 750 + "px,0)", "-webkit-transform": "translate3d(0,-" + 750 + "px,0)", "-moz-transform": "translate3d(0,-" + 750 + "px,0)", "-o-transform": "translate3d(0,-" + 750 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
            }
            if (subCupS == 6) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 980 + "px,0)", "-webkit-transform": "translate3d(0,-" + 980 + "px,0)", "-moz-transform": "translate3d(0,-" + 980 + "px,0)", "-o-transform": "translate3d(0,-" + 980 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 900 + "px,0)", "-webkit-transform": "translate3d(0,-" + 900 + "px,0)", "-moz-transform": "translate3d(0,-" + 900 + "px,0)", "-o-transform": "translate3d(0,-" + 900 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 450 + "px,0)", "-webkit-transform": "translate3d(0,-" + 450 + "px,0)", "-moz-transform": "translate3d(0,-" + 450 + "px,0)", "-o-transform": "translate3d(0,-" + 450 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                mElm_Img.eq(5).css({"transform": "translate3d(0,0px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,0px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,0px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,0px,0) scale(0.49,0.49)"});
            }
            if (subCupS == 7) {
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 1130 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1130 + "px,0)", "-moz-transform": "translate3d(0,-" + 1130 + "px,0)", "-o-transform": "translate3d(0,-" + 1130 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 1050 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1050 + "px,0)", "-moz-transform": "translate3d(0,-" + 1050 + "px,0)", "-o-transform": "translate3d(0,-" + 1050 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 450 + "px,0)", "-webkit-transform": "translate3d(0,-" + 450 + "px,0)", "-moz-transform": "translate3d(0,-" + 450 + "px,0)", "-o-transform": "translate3d(0,-" + 450 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 300 + "px,0)", "-webkit-transform": "translate3d(0,-" + 300 + "px,0)", "-moz-transform": "translate3d(0,-" + 300 + "px,0)", "-o-transform": "translate3d(0,-" + 300 + "px,0)"});
                mElm_Img.eq(5).css({"transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-150px,0) scale(0.49,0.49)"});
                mElm_Img.eq(6).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
            }
            if (subCupS == 8) {
                var cupHx = mElm_Sev_Six
                cupHx.css({"transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-300px,0) scale(0.49,0.49)"});
                mElm_Img.eq(0).css({"transform": "translate3d(0,-" + 1280 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1280 + "px,0)", "-moz-transform": "translate3d(0,-" + 1280 + "px,0)", "-o-transform": "translate3d(0,-" + 1280 + "px,0)"});
                mElm_Img.eq(1).css({"transform": "translate3d(0,-" + 1200 + "px,0)", "-webkit-transform": "translate3d(0,-" + 1200 + "px,0)", "-moz-transform": "translate3d(0,-" + 1200 + "px,0)", "-o-transform": "translate3d(0,-" + 1200 + "px,0)"});
                mElm_Img.eq(2).css({"transform": "translate3d(0,-" + 980 + "px,0)", "-webkit-transform": "translate3d(0,-" + 980 + "px,0)", "-moz-transform": "translate3d(0,-" + 980 + "px,0)", "-o-transform": "translate3d(0,-" + 980 + "px,0)"});
                mElm_Img.eq(3).css({"transform": "translate3d(0,-" + 600 + "px,0)", "-webkit-transform": "translate3d(0,-" + 600 + "px,0)", "-moz-transform": "translate3d(0,-" + 600 + "px,0)", "-o-transform": "translate3d(0,-" + 600 + "px,0)"});
                mElm_Img.eq(4).css({"transform": "translate3d(0,-" + 450 + "px,0)", "-webkit-transform": "translate3d(0,-" + 450 + "px,0)", "-moz-transform": "translate3d(0,-" + 450 + "px,0)", "-o-transform": "translate3d(0,-" + 450 + "px,0)"});
                mElm_Img.eq(6).css({"transform": "translate3d(0,-" + 150 + "px,0)", "-webkit-transform": "translate3d(0,-" + 150 + "px,0)", "-moz-transform": "translate3d(0,-" + 150 + "px,0)", "-o-transform": "translate3d(0,-" + 150 + "px,0)"});
                mElm_Img.eq(7).css({"transform": "translate3d(0,0px,0)", "-webkit-transform": "translate3d(0,0px,0)", "-moz-transform": "translate3d(0,0px,0)", "-o-transform": "translate3d(0,0px,0)"});
                mElm_Sev_Tit.eq(subCupS).addClass("opacit-stop");
            }
            if (subCupS != 0) {
                currentIn++;
            }
            if (subCupS > 1) {
                subCupS--;
            } else {
                subCupS = 0;
            }
            mElm_Sev_Tit.eq(subCupS).addClass("opacit-stop");
            if (subCupS != 0) {
                mElm_Sev_Tit.eq(subCupS - 1).removeClass("opacit-stop");
                Readchar.Event.buildWheel(pageScroll);
            }
        } else {
            $(".pn-list > a").removeClass("fl-top-index");
            $(".pn-list > a").eq(2).addClass("fl-top-index");
            window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
            $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
        }
    }

    function pageEightUp(direct) {
        if (direct != null) {
            mElm_Sev_Six.css({"transform": "translate3d(0,0,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,0,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,0,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,0,0) scale(0.49,0.49)"});
            var cupHx = mElm_Sev_Six;
            if (subCupS == 8) {
                cupHx.css({"transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-457px,0) scale(0.49,0.49)"});
            }
            if (subCupS == 7) {
                cupHx.css({"transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-300px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-300px,0) scale(0.49,0.49)"});
            }
            if (subCupS == 6) {
                cupHx.css({"transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-150px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-150px,0) scale(0.49,0.49)"});
            }
            window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
            $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
        } else {
            if (currentPageNine != 0) {
                currentPageNine--;
                cupLastLay();
                currentIn++;
            } else {
                if (subCupS == 9) {
                    mElm_Sev_Six.css({"transform": "translate3d(0,0,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,0,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,0,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,0,0) scale(0.49,0.49)"});
                    var mpTime = null, actionIcon = $(".cup-x").length - 1;
                    mpTime = setInterval(function () {
                        $(".cup-x").removeClass("mpt-show");
                        actionIcon--;
                        $(".cup-x").eq(actionIcon).addClass("mpt-show");
                        if (actionIcon == 0) {
                            clearInterval(mpTime);
                        }
                    }, 28);
                    var cupHx = mElm_Sev_Six, subTimeEi = null;
                    subTimeEi = setTimeout(function () {
                        cupHx.remove();
                        cupHx.removeClass("cup-hx");
                        $(".cup-07-05").after(cupHx);
                        cupHx.css({"transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-457px,0) scale(0.49,0.49)"});
                        clearTimeout(subTimeEi);
                    }, 900)
                    subCupS--
                }
                window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
                $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
            }
        }
    }

    function pageNineUp(direct) {
        if (direct != null) {
            if (subCupS == 9) {
                mElm_Sev_Six.css({"transform": "translate3d(0,0,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,0,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,0,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,0,0) scale(0.49,0.49)"});
                var mpTime = null, actionIcon = $(".cup-x").length - 1;
                mpTime = setInterval(function () {
                    $(".cup-x").removeClass("mpt-show");
                    actionIcon--;
                    $(".cup-x").eq(actionIcon).addClass("mpt-show");
                    if (actionIcon == 0) {
                        clearInterval(mpTime);
                    }
                }, 28);
                var cupHx = mElm_Sev_Six, subTimeEi = null;
                subTimeEi = setTimeout(function () {
                    cupHx.remove();
                    cupHx.removeClass("cup-hx");
                    $(".cup-07-05").after(cupHx);
                    cupHx.css({"transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-webkit-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-moz-transform": "translate3d(0,-457px,0) scale(0.49,0.49)", "-o-transform": "translate3d(0,-457px,0) scale(0.49,0.49)"});
                    clearTimeout(subTimeEi);
                }, 900)
                subCupS--
            }
        } else {
            mElm_Sev_Six.css({"transform": "translate3d(0,-10px,0) scale(1.0,1.0)", "-webkit-transform": "translate3d(0,-10px,0) scale(1.0,1.0)", "-moz-transform": "translate3d(0,-10px,0) scale(1.0,1.0)", "-o-transform": "translate3d(0,-10px,0) scale(1.0,1.0)"});
        }
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sPageContainerClass).css({"transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-webkit-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-moz-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)", "-o-transform": "translate3d(0,-" + (currentIn - 1) + "00%,0)"});
        chageNavBg(1)
    }

    function pageTenUp() {
        window.location.href = currentURL.substring(0, index) + aPageList[currentIn];
        $(sAllPageConClass).css({"transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)", "-webkit-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)", "-moz-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)", "-o-transform": "translate3d(0,-" + $(defaultOption.headerClass).height() + "px,0)"});
    }

    function pageScroll() {
        if (timeout) {
            clearTimeout(timeout);
        }
        Readchar.Event.unBuildWheel(pageScroll);
        var direct = Readchar.Event.getWheelDelta(Readchar.Event.getEvent()) ? Readchar.Event.getWheelDelta(Readchar.Event.getEvent()) : sDirection;
        if (isNaN(direct)) {
            direct = 0;
        }
        if (direct < 0) {
            var sPageId = window.location.href.substring(index);
            if (currentIn != aPageList.length - 1) {
                currentIn++;
            } else {
                currentIn = aPageList.length - 1;
            }
            if (currentIn == 1) {
                pageOneDown();
            }
            if (currentIn == 2) {
                pageTwoDown();
            }
            if (currentIn == 3) {
                pageThreeDown();
            }
            if (currentIn == 4) {
                pageFourDown()
            }
            if (currentIn == 5) {
                pageFiveDown()
            }
            if (currentIn == 6) {
                pageSixDown()
            }
            if (currentIn == 7) {
                pageSevenDown();
            }
            if (currentIn == 8) {
                pageEightDown()
            }
            if (currentIn == 9) {
                pageNineDown()
            }
            if (currentIn == 10) {
                pageTenDown()
            }
            currentOut = currentIn;
        }
        if (direct > 0) {
            var sPageId = window.location.href.substring(index);
            if (currentIn != 0) {
                currentIn--;
            } else {
                currentIn = 0;
            }
            if (currentIn == 0) {
                pageOneUp();
            }
            if (currentIn == 1) {
                pageTwoUp();
            }
            if (currentIn == 2) {
                pageThreeUp();
            }
            if (currentIn == 3) {
                pageFourUp();
            }
            if (currentIn == 4) {
                pageFiveUp()
            }
            if (currentIn == 5) {
                pageSixUp()
            }
            if (currentIn == 8) {
                currentIn--
            }
            if (currentIn == 7) {
                pageEightUp();
            }
            if (currentIn == 9) {
                pageTenUp()
            }
            if (currentIn == 6) {
                pageSevenUp()
            }
            currentOut = currentIn;
        }
        if (direct == 0) {
            var sPageId = window.location.href.substring(0, index);
            var pageStr = currentURL.substring(index);
            for (var i = 0; i < aPageList.length; i++) {
                if (aPageList[i] == pageStr) {
                    currentIn = i;
                }
            }
            if (currentOut < currentIn) {
                if (currentIn > 7) {
                    currentIn++;
                }
                if (currentIn >= 1) {
                    pageOneDown();
                    if (currentIn >= 2) {
                        pageTwoDown();
                        if (currentIn >= 3) {
                            pageThreeDown();
                            if (currentIn >= 4) {
                                pageFourDown();
                                if (currentIn >= 5) {
                                    pageFiveDown();
                                    if (currentIn >= 6) {
                                        pageSixDown(direct);
                                        if (currentIn >= 7) {
                                            pageSevenDown();
                                            if (currentIn >= 8) {
                                                if (currentIn >= 9) {
                                                    pageNineDown(direct);
                                                    if (currentIn >= 10) {
                                                        pageTenDown(direct);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (currentOut > currentIn) {
                if (currentIn + 1 <= 10) {
                    if (currentIn + 1 <= 9) {
                        pageTenUp();
                        if (currentIn + 1 <= 8) {
                            pageNineUp(direct);
                            if (currentIn + 1 <= 7) {
                                pageEightUp(direct);
                                if (currentIn + 1 <= 6) {
                                    pageSevenUp(pageSevenUp);
                                    if (currentIn + 1 <= 5) {
                                        pageSixUp();
                                        if (currentIn + 1 <= 4) {
                                            pageFiveUp(direct);
                                            if (currentIn + 1 <= 3) {
                                                pageFourUp();
                                                if (currentIn + 1 <= 2) {
                                                    pageThreeUp();
                                                    pageTwoUp();
                                                    if (currentIn + 1 <= 1) {
                                                        pageOneUp(direct);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (currentIn > 7) {
                currentOut = currentIn - 1;
            } else {
                currentOut = currentIn;
            }
        }
        $(".r-navi-icon").removeClass("r-navi-action");
        if (currentIn == 0 || currentIn == 1) {
            $(".r-navi-icon").eq(0).addClass("r-navi-action");
        } else if (currentIn == 7) {
            $(".r-navi-icon").eq(6).addClass("r-navi-action");
        } else if (currentIn == 10 || currentIn == 9) {
            $(".r-navi-icon").eq(7).addClass("r-navi-action");
        } else if (currentIn == 8) {
            if (direct < 0) {
                $(".r-navi-icon").eq(6).addClass("r-navi-action");
            } else {
                $(".r-navi-icon").eq(7).addClass("r-navi-action");
            }
        } else {
            $(".r-navi-icon").eq(currentIn - 1).addClass("r-navi-action");
        }
        timeout = setTimeout(function () {
            Readchar.Event.buildWheel(pageScroll);
        }, defaultOption.duration);
    }

    initPage();
}}
function chageNavBg(index) {
    if (index == 0) {
        $(".navi-bg").css({"opacity": 0.8}, 800);
        $(".navi-fixed").addClass("navi-f-chang");
    }
    if (index == 1) {
        $(".navi-bg").css({"opacity": 0.05}, 800);
        $(".navi-fixed").removeClass("navi-f-chang");
    }
}
$(document).ready(function (e) {
    var movBtn = $(".cup-03-btn"), movLay = $(".cuptime-03-01");
    movBtn.mousedown(function (e) {
        document.onselectstart = function () {
            return false;
        }
        var downX = e.pageX, downY = e.pageY, btnX = parseInt(movBtn.css("left")), layX = parseInt(movLay.css("width")), btn_x = downX - btnX, lay_x = downX - layX;
        $(document).mousemove(function (e) {
            var mouseX = e.pageX;
            movLay.css({"width": mouseX - lay_x, "transition": "none", "-webkit-transition": "none", "-moz-transition": "none"});
        })
        movBtn.mouseup(function () {
            $(document).unbind("mousemove");
        });
        $(document).click(function () {
            $(document).unbind("mousemove");
        })
    });
    $(".cutptime-03-04").width(Readchar.Style.getFullPageSize().width);
    $(".cup-04").hover(function () {
        var i = $(".cup-04").index($(this))
        $(".cup-04-01").eq(i).stop().animate({"opacity": "0.8"}, 500);
        $(".cup-04-02").eq(i).stop().animate({"opacity": "1"}, 500);
        $(".cup-04-icon").eq(i).stop().animate({"opacity": "0"}, 500);
    }, function () {
        var i = $(".cup-04").index($(this))
        $(".cup-04-01").eq(i).stop().animate({"opacity": "0.2"}, 500);
        $(".cup-04-02").eq(i).stop().animate({"opacity": "0"}, 500);
        $(".cup-04-icon").eq(i).stop().animate({"opacity": "1"}, 500);
    });
    $(".lem-05-hover >img").bind({mouseover: function () {
        var index = $(".lem-05-hover >img").index($(this));
        Readchar.Event.stopPropagation(Readchar.Event.getEvent());
        switch (index) {
            case 0:
                $(".cup-line").eq(0).stop(0).animate({"width": "120px"}, 900, function () {
                    $(".cup-03-img").eq(0).removeClass("opacit-stop");
                });
                break;
            case 1:
                $(".cup-line").eq(1).stop().animate({"width": "150px"}, 500, function () {
                    $(".cup-line").eq(2).stop().animate({"width": "150px"}, 400, function () {
                        $(".cup-03-img").eq(1).removeClass("opacit-stop");
                    })
                })
                break;
            case 2:
                $(".cup-line").eq(3).stop().animate({"width": "270px"}, 800, function () {
                    $(".cup-line").eq(4).stop().animate({"width": "50px"}, 100, function () {
                        $(".cup-03-img").eq(2).removeClass("opacit-stop");
                    })
                })
                break;
            case 3:
                $(".cup-line").eq(5).stop().animate({"width": "160px"}, 600, function () {
                    $(".cup-line").eq(6).stop().animate({"width": "160px"}, 200, function () {
                        $(".cup-line").eq(7).stop().animate({"width": "50px"}, 100, function () {
                            $(".cup-03-img").eq(3).removeClass("opacit-stop");
                        });
                    })
                })
                break;
        }
    }, mouseout: function () {
        var index = $(".lem-05-hover >img").index($(this));
        Readchar.Event.stopPropagation(Readchar.Event.getEvent());
        switch (index) {
            case 0:
                $(".cup-03-img").eq(0).addClass("opacit-stop");
                $(".cup-line").eq(0).stop(0).animate({"width": "0"}, 700);
                break;
            case 1:
                $(".cup-03-img").eq(1).addClass("opacit-stop");
                $(".cup-line").eq(2).stop().animate({"width": "0"}, 400, function () {
                    $(".cup-line").eq(1).stop().animate({"width": "0"}, 500)
                })
                break;
            case 2:
                $(".cup-03-img").eq(2).addClass("opacit-stop");
                $(".cup-line").eq(4).stop().animate({"width": "0"}, 100, function () {
                    $(".cup-line").eq(3).stop().animate({"width": "0"}, 800)
                })
                break;
            case 3:
                $(".cup-03-img").eq(3).addClass("opacit-stop");
                $(".cup-line").eq(7).stop().animate({"width": "0"}, 100, function () {
                    $(".cup-line").eq(6).stop().animate({"width": "0"}, 200, function () {
                        $(".cup-line").eq(5).stop().animate({"width": "0"}, 600);
                    })
                })
                break;
        }
    }})
    $(".r-navi-icon").hover(function () {
        var navIndex = $(".r-navi-icon").index($(this));
        $(this).addClass("r-n-hover");
        $(".r-nav-hidden").eq(navIndex).stop().animate({"width": 125, "opacity": 1}, 500);
    }, function () {
        var navIndex = $(".r-navi-icon").index($(this));
        $(this).removeClass("r-n-hover");
        $(".r-nav-hidden").eq(navIndex).stop().animate({"width": 0, "opacity": 0}, 500);
    })
});
window.onscroll = function () {
    if ($(document).scrollTop() > 500) {
        $(".navi-fixed").stop().animate({"top": "0", "opacity": "1"}, 500);
        $(".navi-bg").stop().animate({"opacity": "0.2"}, 500);
    }
    if ($(document).scrollTop() <= 500) {
        $(".navi-fixed").stop().animate({"top": "-65px", "opacity": "0"}, 500);
    }
}
var nStartY, sDirection;
function getStartY(event) {
    if (!event.touches.length)return;
    var touch = event.touches[0];
    nStartY = touch.pageY;
    console.log("getStartY->获得新的触屏高度值" + nStartY);
}
function getDirection(event) {
    event.preventDefault();
    if (!event.touches.length)return;
    var touch = event.touches[0];
    if (nStartY > touch.pageY) {
        sDirection = -1;
    } else if (nStartY < touch.pageY) {
        sDirection = 1;
    } else {
        return false;
    }
    console.log("getDirection->方向为" + sDirection);
}
window.onload = function () {
    $(".loading").remove();
    $(".cup-04-tit").css("top", ($(".mecare-page").height() - $(".cup-04").height()) / 2 - 68);
    $(".cup-04").css("top", $(".mecare-page").height() - $(".cup-04").height());
    if (window.Readchar.Browser.ie < 10) {
        $("body").css({"overflow-y": "scroll"});
        $(".navi-bg").css({"background": "#000", "opacity": "0.5"});
        $(".cuptime-title").removeClass("tit-stop");
        $(".cuptime-left").removeClass("left-stop");
        $(".cuptime-right").removeClass("right-stop");
        $(".cup-02").removeClass("cup-stop");
        $(".cup-02").css({"top": "50%"});
        $(".cup-02-icon").removeClass("opacit-stop");
        $(".cuptime-02-04").removeClass("opacit-stop");
        $(".cup-03-title").removeClass("opacit-stop");
        $(".cup-04-tit").removeClass("opacit-stop");
        $(".cup-05-04").removeClass("opacit-stop");
        $(".cup-06").removeClass("opacit-stop");
        $(".cup-08").removeClass("opacit-stop");
        $(".cup-07-tit").css("top", "7%")
        $(".right-navi").hide();
        $(".cup-09").hide();
        $(".cup-09-02").hide();
        $(".lem-05-qb").hide();
        $(".lem-05-qc").hide();
        $(".mpt-show").hide();
    } else {
        Readchar.Event.addEvent(document, "touchstart", getStartY);
        Readchar.Event.addEvent(document, "touchmove", getDirection);
        $(".mecare-con").addClass("mecar-action");
        Readchar.Plugins.pageHTML5Scroll({pageIdList: ["#header", "#page-01-show", "#page-02-show", "#page-03-show", "#page-04-show", "#page-05-show", "#page-06-show", "#page-07-show", "#page-08-show", "#page-09-show", "#footer"], pageClass: ".mecare-page", pageContainerClass: ".mecare-action", allPageConClass: ".mecare-page-container", duration: 1000, headerClass: ".mecare-header", footerClass: ".footer"});
    }
}
window.onresize = function () {
    $(".mecare-page").height(Readchar.Style.getFullPageSize().height);
    $(".cutptime-03-04").width(Readchar.Style.getFullPageSize().width);
}


//Readchar mecare
if (typeof Readchar == "undefined" || !Readchar) {
    var Readchar = {};
}
;
Readchar.Browser = (function () {
    var Sys = {};
    var ua = navigator.userAgent.toLowerCase();
    var s;
    (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
    return Sys;
})();
Readchar.Common = {extend: function (oTarget, oSource) {
    for (var p in oSource) {
        if (oSource.hasOwnProperty(p)) {
            oTarget[p] = oSource[p]
        }
    }
    return oTarget;
}}
Readchar.DOM = {findElements: function (Selector) {
    if (/^#\w+/i.test(Selector)) {
        var element = document.getElementById(Selector.substr(1));
        return element == null ? null : element;
    }
    else if (/^\.\w+/i.test(Selector)) {
        var elements = document.getElementsByClassName(Selector.substr(1));
        return elements.length == 0 ? null : elements;
    }
    else {
        var elements = document.getElementsByTagName(Selector);
        return elements.length == 0 ? null : elements;
    }
}, delectElements: function (elements) {
    var size = elements.length ? elements.length : null;
    if (size) {
        for (var i = 0; i < size; i++) {
            elements[0].parentNode.removeChild(elements[0]);
        }
    } else {
        elements.parentNode.removeChild(elements);
    }
}, addElements: function (parentElement, element, index) {
    if (index != null) {
        parentElement.insertBefore(element, parentElement.childNodes[index]);
    } else {
        parentElement.appendChild(element);
    }
}, createElements: function (tagName) {
    var elements = document.createElement(tagName);
    return elements ? elements : null;
}, replaceElement: function (oldElements, newElement) {
    try {
        if (oldElements.length) {
            for (var i = 0; i < oldElements.length; i++) {
                oldElements[i].parentNode.replaceChild(newElement, oldElements[i]);
            }
        } else {
            var parenetElement = oldElements.parentNode;
            parenetElement.replaceChild(newElement, oldElements);
        }
    } catch (e) {
    }
}}
var $Readchar = Readchar.DOM.findElements, _$Readchar = Readchar.DOM.delectElements;
Readchar.Style = {getCurrentStyle: function (oEml, sOpation) {
    return oEml.currentStyle ? oEml.currentStyle[sOpation] : getComputedStyle(oEml, null)[sOpation];
}, getFullPageSize: function () {
    var fullPageSize = {};
    fullPageSize.width = window.innerWidth, fullPageSize.height = window.innerHeight;
    if (typeof pageWidth != "number") {
        if (document.compatMode == "CSS1Compat") {
            pageWidth = document.documentElement.clientWidth;
            pageHeight = document.documentElement.clientHeight;
        } else {
            pageWidth = document.body.clientWidth;
            pageHeight = document.body.clientHeight;
        }
    }
    return fullPageSize;
}}
Readchar.Event = {addEvent: function (oElm, sEventType, fnHandler) {
    if (oElm.addEventListener) {
        oElm.addEventListener(sEventType, fnHandler, false);
    } else if (oElm.attachEvent) {
        oElm.attachEvent("on" + sEventType, fnHandler);
    } else {
        oElm["on" + sEventType] = fnHandler;
    }
}, getEvent: function () {
    if (document.all)return window.event;
    func = Readchar.Event.getEvent.caller;
    while (func != null) {
        var arg0 = func.arguments[0];
        if (arg0) {
            if ((arg0.constructor == Event || arg0.constructor == MouseEvent) || (typeof(arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) {
                return arg0;
            }
        }
        func = func.caller;
    }
    return null;
}, getTarget: function (event) {
    return event.target || event.srcElement;
}, removeEvent: function (oElm, sEventType, fnHandler) {
    if (oElm.removeEventListener) {
        oElm.removeEventListener(sEventType, fnHandler, false);
    } else if (oElm.detachEvent) {
        oElm.detachEvent("on" + sEventType, fnHandler);
    } else {
        oElm["on" + sEventType] = null;
    }
}, stopPropagation: function (event) {
    if (event.stopPropagation) {
        event.stopPropagation();
    } else {
        event.cancelBubble = true;
    }
}, stopDefault: function (event) {
    if (event.preventDefault) {
        event.preventDefault();
    } else {
        event.returnValue = false;
    }
}, getWheelDelta: function (event) {
    if (event.wheelDelta) {
        return(Readchar.Browser.opera < 9.5 ? -event.wheelDelta : event.wheelDelta)
    } else {
        return-event.detail * 40;
    }
}, getTouchStart: function (event) {
    this.stopDefault(event);
    if (!event.touches.length)return;
    return event.touches[0];
}, getTouchMove: function (event) {
    this.stopDefault(event);
    if (!event.touches.length)return;
    return event.touches[0];
}, buildWheel: function (fnHandler) {
    this.addEvent(document, "mousewheel", fnHandler);
    this.addEvent(document, "DOMMouseScroll", fnHandler);
}, unBuildWheel: function (fnHandler) {
    this.removeEvent(document, "mousewheel", fnHandler);
    this.removeEvent(document, "DOMMouseScroll", fnHandler);
}, drag: function (oElm, sDir) {
    if (!oElm) {
        return false;
    }
    oElm.style.position = "absolute";
    this.addEvent(oElm, "mouseover", function () {
        oElm.style.cursor = "move";
    });
    this.addEvent(oElm, "mouseout", function () {
        oElm.style.cursor = "default";
    })
    this.addEvent(oElm, "mousemove", function () {
    })
}};
Readchar.Check = Rc = {checkEmail: function (sString) {
    var email = /^\w+([\.-]\w+)*@\w+([\.-]\w+)*\.\w{2,4}$/;
    return this.fn(sString, email);
}, checkUserName: function (sString) {
    var userName = /^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){4,19}$/;
    return this.fn(sString, userName);
}, checkPassWord: function (sString) {
    var passWord = /^([a-zA-Z0-9]|[_]){6,16}$/;
    return this.fn(sString, passWord);
}, checkChcode: function (sString) {
    var chCode = /^([0-9]){6}$/;
    return this.fn(sString, chCode);
}, checkEmCode: function (sString) {
    var chCode = /^([a-zA-Z0-9]){6}$/;
    return this.fn(sString, chCode);
}, checkMobilePhone: function (sString) {
    var mobileNumbe = /^((\+86)|(86))?(13[0-9]|15[012356789]|18[0-9]|14[57])[0-9]{8}$/;
    return this.fn(sString, mobileNumbe);
}, checkChineseName: function (sString) {
    var userName = /^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z]){1,10}$/;
    return this.fn(sString, userName);
}, checkAddress: function (sString) {
    var address = /^\S{1,80}$/;
    return this.fn(sString, address);
}};
function fn(sString, sCheck) {
    sString = sString.replace(/\s+/g, "")
    if (sCheck.test(sString)) {
        return true;
    } else {
        return false;
    }
}